package com.cxx.purchasecharge.dal;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.cxx.purchasecharge.core.model.OrderSearchForm;
import com.cxx.purchasecharge.core.model.OrderTypeCode;
import com.cxx.purchasecharge.core.model.persistence.Order;
import com.cxx.purchasecharge.dal.exception.PCDalException;

public interface OrderDaoPlus
{
    public Page <Order> findByFuzzy (OrderTypeCode typeCode, Pageable pageable, String searchKey, long signUser,
                                     boolean admin) throws PCDalException;

    public Page <Order> findBySearchForm (OrderTypeCode typeCode, Pageable pageable, OrderSearchForm searchForm,
        long signUser, boolean admin) throws PCDalException;
    
    public Page <Order> findBySearchForm (boolean out, Pageable pageable, OrderSearchForm searchForm,
        long signUser, boolean admin) throws PCDalException;
    
    public float countReceivableBy (OrderTypeCode typeCode, OrderSearchForm searchForm,
        long signUser, boolean admin) throws PCDalException;
    
    public float countProfitBy (OrderTypeCode typeCode, OrderSearchForm searchForm,
        long signUser, boolean admin) throws PCDalException;
}
